package SEDay07;

/*#### 案例需求

        ​	定义一个方法，用于比较两个数组的内容是否相同*/

import jdk.nashorn.internal.ir.ReturnNode;

public class Text03 {
    public static void main(String[] args) {
        int[] arrA = {68, 27, 95, 88, 171, 996, 51, 210};
        int[] arrB = {68, 27, 95, 88, 171, 996, 51, 210};
        Boolean res = sum(arrA,arrB);
        if (!res) {
            System.out.println("两个数组内容不同");
        }else {
            System.out.println("两个数组内容相同");
        }
    }

    public static Boolean sum(int[] arrA,int[] arrB) {
        if (arrA.length != arrB.length) {
            return false;
        }else {
            for (int i = 0; i < arrA.length; i++) {
                if (arrA[i] != arrB[i]) {
                    return false;
                }
            }
        }
        return true;
    }
}
